import request from '@/utils/request'
import FormatPackage from '@/utils/response-format-package'

export function getMarqueeList(params = {}, defaultErrMsg = '') {
  return FormatPackage(
    request({
      url: '/advertise/list',
      method: 'get',
      params
    }),
    defaultErrMsg
  )
}

export function deleteMarquee(params = {}, defaultErrMsg = '') {
  return FormatPackage(
    request({
      url: '/advertise/delete',
      method: 'get',
      params
    }),
    defaultErrMsg
  )
}
export function addMarquee(params = {}, defaultErrMsg = '') {
  return FormatPackage(
    request({
      url: '/advertise/add',
      method: 'get',
      params
    }),
    defaultErrMsg
  )
}
export function publishMarquee(params = {}, defaultErrMsg = '') {
  return FormatPackage(
    request({
      url: '/advertise/publish',
      method: 'get',
      params
    }),
    defaultErrMsg
  )
}
export function publishMarqueeEnd(params = {}, defaultErrMsg = '') {
  return FormatPackage(
    request({
      url: '/advertise/end',
      method: 'get',
      params
    }),
    defaultErrMsg
  )
}
export function updateMarquee(params = {}, defaultErrMsg = '') {
  return FormatPackage(
    request({
      url: '/advertise/update',
      method: 'get',
      params
    }),
    defaultErrMsg
  )
}
// 暂未提供
export function getMarqueeDetail(params = {}, defaultErrMsg = '') {
  return FormatPackage(
    request({
      url: '/advertise/detail',
      method: 'get',
      params
    }),
    defaultErrMsg
  )
}

